package com.aaa.controller;

import com.aaa.dao.TypeMapper;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("type")
public class TypeController {
    @Resource
    TypeMapper typeMapper;
    @RequestMapping("select")
    public Object select(){
        return typeMapper.selectList(null);
    }
    @RequestMapping("delete")
    public Integer delete(Integer tid){
        return typeMapper.deleteById(tid);
    }
}
